home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
gnu
/
gnulib
/
libsrc98.zoo
/
Makefile
< prev
next >
Wrap
Makefile
|
1993-11-05
|
3KB
|
182 lines
#
# Top level Makefile for TOS-Gcc library
#
# GCC configuration info...
# Leave the next line undefined for native compilation setup.
CROSSDIR := /net/acae127/home/bammi/atari/cross-gcc
# Define MINTFLAG when compiling mntlib
#
# MINTFLAG := -mint
ifdef MINTFLAG
MINTOPT := -mint
else
MINTOPT :=
endif
ifdef CROSSDIR
# Set up to do cross-compiling...
CROSSLIB := $(CROSSDIR)/lib
CROSSBIN := $(CROSSDIR)/bin
AR := $(CROSSBIN)/car
AS := cgcc $(MINTOPT)
CC := cgcc $(MINTOPT)
LIB := $(CROSSLIB)
VPATH := ../co
else
# Set up to run native...
AR := gcc-ar
AS := gcc $(MINTOPT)
CC := gcc $(MINTOPT)
LIB := d:\gnu\lib
endif
# Flags for extra 'long long' support under newer gcc's
#LONGLONG=-DPRINTF_LONGLONG
# Additional options for compiling C code
XFLAGS := -I../co -Wall -Wmissing-prototypes -Wstrict-prototypes
# Dynamic selection of options for each target library...
ifneq (,$(findstring debug,$(TARGET)))
OPTIM= -O -g -Wstrict-prototypes
FRAME=
DEBUG=
g=g
else
OPTIM= -O2 -fstrength-reduce
FRAME= -fomit-frame-pointer
DEBUG= -DNDEBUG
g=
endif
ifneq (,$(findstring long-int,$(TARGET)))
SHORT=
DSHORT=
ST=
else
SHORT= -mshort
DSHORT= -DSHORTLIB
ST=16
endif
ifneq (,$(findstring 68020,$(TARGET)))
CC := $(CC) -m68020 -m68881
endif
ifneq (,$(findstring baserel,$(TARGET)))
CC := $(CC) -mbaserel
b=b
else
b=
endif
# common subset of options; no int size or omit-frame-pointer:
COPTS= $(DEBUG) $(OPTIM) $(XFLAGS)
# Base options CC; includes int size but not omit-frame-pointer
CFFLAGS = $(SHORT) $(COPTS)
# normal CFLAGS including int size and omit-frame-pointer
CFLAGS= $(CFFLAGS) $(FRAME) $(LONGLONG)
# cflags for stuff that needs to be compiled with 32 bit ints
CLFLAGS= $(COPTS) $(FRAME) $(DSHORT)
# flags to $(CC) when it runs the assembler only
ASFLAGS= -c
# flags to $(CC) when running preprocessor and assembler
PPFLAGS= $(XPFLAGS) $(SHORT) $(SFPFLAG) -P -c
# library targets
ifdef MINTFLAG
CLIB= $bmint$g$(SFP)$(ST).olb
CLIB020=$bmint$g$(SFP)$(ST)020.olb
IIOLIB= $bmiio$g$(SFP)$(ST).olb
CRT0=$bmcrt0.o
GCRT0=$bmgcrt0.o
else
CLIB= $bgnu$g$(SFP)$(ST).olb
CLIB020=$bgnu$g$(SFP)$(ST)020.olb
IIOLIB= $biio$g$(SFP)$(ST).olb
CRT0=$bcrt0.o
GCRT0=$bgcrt0.o
endif
STARTO= $(CRT0) $(GCRT0)
# the stuff to make
ALL= $(CLIB) $(IIOLIB) $(STARTO)
ALL020 = $(CLIB020) $(STARTO)
#all: lshort llong lgshort lglong
top: lshort llong
#top: l020short l020long l020bshort l020blong
lshort:
$(MAKE) clean
$(MAKE) install
llong:
$(MAKE) clean
$(MAKE) install TARGET="long-int"
lgshort:
$(MAKE) clean
$(MAKE) install TARGET=debug
lglong:
$(MAKE) clean
$(MAKE) install TARGET="long-int debug"
l020short:
$(MAKE) clean
$(MAKE) install TARGET=68020
# $(MAKE) install020 TARGET=68020
l020long:
$(MAKE) clean
$(MAKE) install TARGET="68020 long-int"
# $(MAKE) install020 TARGET="68020 long-int"
lbshort:
$(MAKE) clean
$(MAKE) install TARGET="baserel"
lblong:
$(MAKE) clean
$(MAKE) install TARGET="long-int baserel"
l020bshort:
$(MAKE) clean
$(MAKE) install TARGET="68020 baserel"
l020blong:
$(MAKE) clean
$(MAKE) install TARGET="68020 long-int baserel"
realclean:
rm -f *.o *.olb
rm -f core report
# Get the rules to build everything...
include mincl